<!--
Computer Science Course 531 - Introduction to Software Engineering
Olive Insurance Client Management System (Client Database Access)
Version 1.0 (Base System)
Spring 2011

-- Source Code Details --
Page Tile: mainPage.php
Created By: David Gonzalez, Computer Science (Undergraduate)
Documented By: Darrius Serrant, Computer Science (Undergraduate)
Purpose: User interface that provides users access to all of this application's basic
         functionalities:
            (a) Adding, modifying, and removing agency groups to relational database.
            (b) Adding, modifying, and removing employees to the relational database.
            (c) Generating reports that reflect the database's contents.
          Users who are authorized system administrators have additional access to the
          following functionalities:
            (a) Adding, modifying, and removing user accounts
            (b) Adding, modifying, and removing carrier and coverage types

Status: Completed. All critical features have been implemented. Interface redesign completed.
        Source code optimization pending.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>
            Olive Insurance Client Management System - Main Page
        </title>
        <link rel="stylesheet" type="text/css" href="styles/main.css" />
    </head>
    <body>
        <div id ="contentbox">

            <div id="header">
                <img src="images/header.gif" alt="Olive Insurance Client Management System, Version 1.0" />
            </div>
            <div id="separator">
                <img src="images/separator.gif" alt="" />
            </div>
            <div id="content">
                <?php
                    session_start ();
                    if(isset($_SESSION['user_name'])){
                ?>
            <div id="userBlock">
		<span class="user">
                    <?php
                        echo "(". $_SESSION['user_name'] . ")" ;
                    ?>
                </span>
		<span class="logout"><a href="logOut.php">log out</a></span> <br />
		<span class="userclass">
                </span>
            </div>

            <h3>
		Management Options
            </h3>

            <div class="managementOptions">
                <div class="manageBox left">
                    <h1><a href="agencyGroupDetails.php">Manage Groups</a></h1>
                    <p>
			Create groups by which to manage people employed by an insured businesses and non-profit organization;
			update existing groups’ information, or remove groups from the registry.
                    </p>
                    <a href="agencyGroupDetails.php"><img src="images/group.gif" alt="Manage Groups" /></a>
                </div>

		<div class="manageBox right">
                    <h1><a href="employeeDetails.php">Manage Employees</a></h1>
			<p>
                            Register new people under existing groups, update their personal information, or remove them from a group or from the registry.
			</p>
			<a href="employeeDetails.php"><img src="images/employees.gif" alt="Manage Employees" /></a>
		</div>
            </div>

            <div class="managementOptions">
                <div class="manageBox left leftclear">
                    <h1><a href="reportDetails.html">Create Reports</a></h1>
                    <p>
                        Generate census reports, renewal reports, company listings, etc...
                    </p>
                    <a href="reportDetails.html"><img src="images/reports.gif" alt="Create Reports" /></a>
		</div>
                <?php
                    if ( $_SESSION['user_name'] == "Admin") {
                ?>
		<div class="manageBox right">
                    <h1><a href="">Manage Application</a></h1>
                    <p>
			<a href="agentAccountDetails.php">
                            Manage the users that access and utilize this application by adding, removing, and modifying user accounts.
			</a>
                    </p>
                    <p>
			<a href="carrierDetails.php">
                            Add, remove, or change the insurance carriers that the application recognizes.
			</a>
                    </p>
                    <p>
			<a href="coverageTypeDetails.php">
                            Manage the insurance coverage types that your business handles.
			</a>
                    </p>
                </div>
                <?php
                    }
                 ?>
            </div>
            <?php
                }
                else {
            ?>
            <div id="loginbox">
                <p class="sectionheader">
                    Authentication Required
                </p>
                <div id="loginform">
                    <div class="invalid">
                        <img src="images/Progress_Wheel.gif" alt="" />This page is restricted from unauthorized users. Please log in.
                    </div>
                </div>
            </div>
             <?php
                header('Refresh: 2; ./loginPage.php');
             }
             ?>
	</div>

        <div id="footer">
            Copyright &copy; 2011 by Olive Insurance, LLC. All rights reserved.
        </div>
    </div>
    </body>
 </html>